import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {MenubarModule} from "primeng/menubar";
import {CardModule} from "primeng/card";
import {MessageModule} from "primeng/message";
import {MessagesModule} from "primeng/messages";
import {ButtonModule} from "primeng/button";
import {InputTextModule} from "primeng/inputtext";
import {ReactiveFormsModule} from "@angular/forms";
import {InputMaskModule} from "primeng/inputmask";
import {CalendarModule} from "primeng/calendar";
import {CheckboxModule} from "primeng/checkbox";
import {DropdownModule} from "primeng/dropdown";
import {TableModule} from "primeng/table";
import {ConfirmPopupModule} from "primeng/confirmpopup";
import {ToastModule} from "primeng/toast";
import {MessageService} from "primeng/api";

const PRIMENG_MODULES = [
  MenubarModule,
  CardModule,
  MessageModule,
  MessagesModule,
  ButtonModule,
  InputTextModule,
  InputMaskModule,
  CalendarModule,
  CheckboxModule,
  DropdownModule,
  TableModule,
  ConfirmPopupModule,
  ToastModule
];

const ANGULAR_MODULES = [
  CommonModule,
  ReactiveFormsModule
];

@NgModule({
  declarations: [],
  imports: [
    ...ANGULAR_MODULES,
    ...PRIMENG_MODULES
  ],
  exports: [
    ...ANGULAR_MODULES,
    ...PRIMENG_MODULES
  ],
  providers: [
    MessageService
  ]
})
export class SharedModule {
}
